<html><!-- Created using the cpp_pretty_printer from the dlib C++ library.  See http://dlib.net for updates. --><head><title>dlib C++ Library - set_utils_abstract.h</title></head><body bgcolor='white'><pre>
<font color='#009900'>// Copyright (C) 2007  Davis E. King (davis@dlib.net)
</font><font color='#009900'>// License: Boost Software License   See LICENSE.txt for the full license.
</font><font color='#0000FF'>#undef</font> DLIB_SET_UTILs_ABSTRACT_
<font color='#0000FF'>#ifdef</font> DLIB_SET_UTILs_ABSTRACT_

<font color='#0000FF'>#include</font> "<a style='text-decoration:none' href='../set.h.html'>../set.h</a>"
<font color='#0000FF'>#include</font> "<a style='text-decoration:none' href='../algs.h.html'>../algs.h</a>"

<font color='#0000FF'>namespace</font> dlib
<b>{</b>

<font color='#009900'>// ----------------------------------------------------------------------------------------
</font>
    <font color='#0000FF'>template</font> <font color='#5555FF'>&lt;</font>
        <font color='#0000FF'>typename</font> T,
        <font color='#0000FF'>typename</font> U
        <font color='#5555FF'>&gt;</font>
    <font color='#0000FF'><u>unsigned</u></font> <font color='#0000FF'><u>long</u></font> <b><a name='set_intersection_size'></a>set_intersection_size</b> <font face='Lucida Console'>(</font>
        <font color='#0000FF'>const</font> T<font color='#5555FF'>&amp;</font> a,
        <font color='#0000FF'>const</font> U<font color='#5555FF'>&amp;</font> b
    <font face='Lucida Console'>)</font>;
    <font color='#009900'>/*!
        requires
            - T and U must both be implementations of set/set_kernel_abstract.h
        ensures
            - returns the number of elements that are in both set a and b
    !*/</font>

<font color='#009900'>// ----------------------------------------------------------------------------------------
</font>
    <font color='#0000FF'>template</font> <font color='#5555FF'>&lt;</font>
        <font color='#0000FF'>typename</font> T,
        <font color='#0000FF'>typename</font> U,
        <font color='#0000FF'>typename</font> V
        <font color='#5555FF'>&gt;</font>
    <font color='#0000FF'><u>void</u></font> <b><a name='set_union'></a>set_union</b> <font face='Lucida Console'>(</font>
        <font color='#0000FF'>const</font> T<font color='#5555FF'>&amp;</font> a,
        <font color='#0000FF'>const</font> U<font color='#5555FF'>&amp;</font> b,
        V<font color='#5555FF'>&amp;</font> u
    <font face='Lucida Console'>)</font>;
    <font color='#009900'>/*!
        requires
            - T, U, and V must all be implementations of set/set_kernel_abstract.h
            - the types of objects contained in these sets must be copyable
        ensures
            - #u == the union of a and b.  That is, u contains all elements 
              of a and all the elements of b.
    !*/</font>

<font color='#009900'>// ----------------------------------------------------------------------------------------
</font>
    <font color='#0000FF'>template</font> <font color='#5555FF'>&lt;</font>
        <font color='#0000FF'>typename</font> T,
        <font color='#0000FF'>typename</font> U,
        <font color='#0000FF'>typename</font> V
        <font color='#5555FF'>&gt;</font>
    <font color='#0000FF'><u>void</u></font> <b><a name='set_intersection'></a>set_intersection</b> <font face='Lucida Console'>(</font>
        <font color='#0000FF'>const</font> T<font color='#5555FF'>&amp;</font> a,
        <font color='#0000FF'>const</font> U<font color='#5555FF'>&amp;</font> b,
        V<font color='#5555FF'>&amp;</font> i
    <font face='Lucida Console'>)</font>;
    <font color='#009900'>/*!
        requires
            - T, U, and V must all be implementations of set/set_kernel_abstract.h
            - the types of objects contained in these sets must be copyable
        ensures
            - #i == the intersection of a and b.  That is, i contains all elements 
              of a that are also in b.
    !*/</font>

<font color='#009900'>// ----------------------------------------------------------------------------------------
</font>
    <font color='#0000FF'>template</font> <font color='#5555FF'>&lt;</font>
        <font color='#0000FF'>typename</font> T,
        <font color='#0000FF'>typename</font> U,
        <font color='#0000FF'>typename</font> V
        <font color='#5555FF'>&gt;</font>
    <font color='#0000FF'><u>void</u></font> <b><a name='set_difference'></a>set_difference</b> <font face='Lucida Console'>(</font>
        <font color='#0000FF'>const</font> T<font color='#5555FF'>&amp;</font> a,
        <font color='#0000FF'>const</font> U<font color='#5555FF'>&amp;</font> b,
        V<font color='#5555FF'>&amp;</font> d 
    <font face='Lucida Console'>)</font>;
    <font color='#009900'>/*!
        requires
            - T, U, and V must all be implementations of set/set_kernel_abstract.h
            - the types of objects contained in these sets must be copyable
        ensures
            - #d == the difference of a and b.  That is, d contains all elements 
              of a that are NOT in b.
    !*/</font>

<font color='#009900'>// ----------------------------------------------------------------------------------------
</font>
<b>}</b>

<font color='#0000FF'>#endif</font> <font color='#009900'>// DLIB_SET_UTILs_ABSTRACT_
</font>


</pre></body></html>